<!DOCTYPE html>
<html class="x-admin-sm">
    <head>
        <meta charset="UTF-8">
        <title></title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="/static/css/font.css">
        <link rel="stylesheet" href="/static/css/xadmin.css">
        <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="/static/js/xadmin.js"></script>
         <!--让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--[if lt IE 9]>-->
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
          <script src="/static/xadmin/js/jquery-3.1.1.min.js"></script>
            <script src="/static/js/jquery.media.js"></script>
        <!--<![endif]-->
    </head>
    <body>
        {if $admin.rid ==9}
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
            <legend>添加信息</legend>
        </fieldset> 
        <div class="layui-bg-gray" style="padding: 30px;">
          <div class="layui-row layui-col-space15">
            <!--<div class="layui-col-md6">-->
            <!--  <div class="layui-panel">-->
            <!--    <div style="padding: 50px 30px;">-->
            <!--        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">-->
            <!--          <legend>特教/中小学/中职</legend>-->
            <!--        </fieldset> -->
            <!--        <div class="layui-upload-drag" id="test3">-->
            <!--          <i class="layui-icon"></i>-->
            <!--          <p>点击上传，或将文件拖拽到此处</p>-->
            <!--          <div class="layui-hide" id="uploadDemoView1">-->
            <!--            <hr>-->
            <!--            <img src="" alt="上传成功后渲染" style="max-width: 196px">-->
            <!--          </div>-->
            <!--        </div>-->
                    
            <!--    </div>-->
            <!--    <a type="button" style="margin-left:105px;" href="/uploads/导入学校模板-1.xlsx" class="layui-btn layui-btn-normal">下载模板</a>-->
            <!--  </div>   -->
            <!--</div>-->
            <div class="layui-col-md6">
              <div class="layui-panel">
                <div style="padding: 50px 30px;">
                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                      <legend>所属学校</legend>
                    </fieldset> 
                    <div class="layui-upload-drag" id="test1">
                      <i class="layui-icon"></i>
                      <p>点击上传，或将文件拖拽到此处</p>
                      <div class="layui-hide" id="uploadDemoView1">
                        <hr>
                        <img src="" alt="上传成功后渲染" style="max-width: 196px">
                      </div>
                    </div>
                    
                </div>
                <a type="button" style="margin-left:105px;" href="/uploads/导入学校模板.xlsx" class="layui-btn layui-btn-normal">下载模板</a>
              </div>   
            </div>
            <!--<div class="layui-col-md6">-->
            <!--  <div class="layui-panel">-->
            <!--    <div style="padding: 50px 30px;">-->
            <!--        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">-->
            <!--          <legend>专家</legend>-->
            <!--        </fieldset> -->
                     
            <!--        <div class="layui-upload-drag" id="test2">-->
            <!--          <i class="layui-icon"></i>-->
            <!--          <p>点击上传，或将文件拖拽到此处</p>-->
            <!--          <div class="layui-hide" id="uploadDemoView2">-->
            <!--            <hr>-->
            <!--            <img src="" alt="上传成功后渲染" style="max-width: 196px">-->
            <!--          </div>-->
            <!--        </div>-->
            <!--        <a type="button" href="" class="layui-btn layui-btn-normal">下载模板</a>-->
            <!--    </div>-->
            <!--  </div>   -->
            <!--</div>-->
          </div> 
        </div>
        {/if}
        {if $admin.rid ==11}
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
            <legend>添加信息</legend>
        </fieldset> 
        <div class="layui-bg-gray" style="padding: 30px;">
          <div class="layui-row layui-col-space15">
            <div class="layui-col-md6">
              <div class="layui-panel">
                <div style="padding: 50px 30px;">
                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                      <legend>教育局</legend>
                    </fieldset> 
                    <div class="layui-upload-drag" id="test4">
                      <i class="layui-icon"></i>
                      <p>点击上传，或将文件拖拽到此处</p>
                      <div class="layui-hide" id="uploadDemoView4">
                        <hr>
                        <img src="" alt="上传成功后渲染" style="max-width: 196px">
                      </div>
                    </div>
                    
                </div>
                <a type="button" style="margin-left:105px;" href="/uploads/导入教育局.xlsx" class="layui-btn layui-btn-normal">下载模板</a>
              </div>   
            </div>
            
            <div class="layui-col-md6">
              <div class="layui-panel">
                <div style="padding: 50px 30px;">
                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                      <legend>直属校</legend>
                    </fieldset> 
                     
                    <div class="layui-upload-drag" id="test2">
                      <i class="layui-icon"></i>
                      <p>点击上传，或将文件拖拽到此处</p>
                      <div class="layui-hide" id="uploadDemoView2">
                        <hr>
                        <img src="" alt="上传成功后渲染" style="max-width: 196px">
                      </div>
                    </div>
                    
                </div>
                <a type="button" style="margin-left:105px;" href="/uploads/导入学校模板.xlsx" class="layui-btn layui-btn-normal">下载模板</a>
              </div>   
            </div>
          </div> 
        </div>
        {/if}
    </body>
    <script>
    layui.use(['upload', 'element', 'layer'], function(){
      var $ = layui.jquery
      ,upload = layui.upload
      ,element = layui.element
      ,layer = layui.layer;
            upload.render({
                elem: '#test1'
                ,url: '/index/index/uploadschool?type=1' //改成您自己的上传接口
                ,accept: 'file'
                ,'field':'file'
                ,done: function(res){
                  layer.msg('上传成功');
                 window.location.href='/index/wei/school';
                }
              });
            upload.render({
                elem: '#test2'
                ,url: '/index/index/uploadschool?type=2' //改成您自己的上传接口
                ,accept: 'file'
                ,'field':'file'
                ,done: function(res){
                  layer.msg('上传成功');
                //   layui.$('#uploadDemoView').removeClass('layui-hide').find('img').attr('src', res.files.file);
                  window.location.href='/index/Power/admin';
                }
              });
            upload.render({
                elem: '#test3'
                ,url: '/index/index/uploadschool?type=3' //改成您自己的上传接口
                ,accept: 'file'
                ,'field':'file'
                ,done: function(res){
                    if(res.status==1){
                        layer.msg('上传成功');
                        //   layui.$('#uploadDemoView').removeClass('layui-hide').find('img').attr('src', res.files.file);
                          window.location.href='/index/wei/school';
                    }else{
                        layer.msg(res.msg);
              
                    }
                  
                }
              });
            upload.render({
                elem: '#test4'
                ,url: '/index/index/uploadschool?type=4' //改成您自己的上传接口
                ,accept: 'file'
                ,'field':'file'
                ,done: function(res){
                    if(res.status==1){
                        layer.msg('上传成功');
                        //   layui.$('#uploadDemoView').removeClass('layui-hide').find('img').attr('src', res.files.file);
                          window.location.href='/index/wei/school';
                    }else{
                        layer.msg(res.msg);
              
                    }
                  
                }
              });
    });
    </script>
</html>